<template>
  <!-- 报警信息-->
  <view class="pwd-retrieve-container">
    <view class="hidden-title">访客信息</view>
    <detail-item :detail="detail" />
  </view>
</template>

<script>
import DetailItem from '@/pages/work/visitor-regist/components/detailItem.vue'
import { reqVisitorManageDetail } from '@/api/visitor-regist'

export default {
  components: {
    DetailItem
  },
  data() {
    return {
      detail: {}
    }
  },
  onLoad({ id, name }) {
    this.fetchDetail(id)
  },
  methods: {
    async fetchDetail(id) {
      const info = await reqVisitorManageDetail(id)
      this.detail = info.data
    }
  }
}
</script>

<style lang="scss">
.hidden-title {
  background: #f5f5f5;
  padding: 20rpx;
  color: #999;
}
</style>
